@extends("/paging_template")
@import com.mgfireworks.mgplatform.mgadmin.product.model.*
@args List<Stock> stockList
<s_panel>
	<s_title slot="title">仓库产品列表</s_title>
	<s_input name="orgId" text="所属机构" value="@val("orgId")"></s_input>
	<s_input name="productName" text="产品名" value="@val("productName")"></s_input>
	<s_input name="areaId" text="区域编号" value="@val("areaId")"></s_input>
	<s_input name="quantity" text="库存数" value="@val("quantity")"></s_input>
	<s_input name="outOfStock" text="是否缺货" value="@val("outOfStock")"></s_input>
	<s_input name="checkState" text="审核状态" value="@val("checkState")"></s_input>
	<s_buttons slot="button" cols="4">
		<s_button type="query"></s_button>
		<s_button type="link" icon="fa-plus" href="@url("add.html")">添加</s_button>
		<s_button type="link" icon="fa-pencil" href="@url("edit.html?stockId={0}")">修改</s_button>
		<s_button type="del" href="@url("del.json?stockId={0}")">删除</s_button>
	</s_buttons>
</s_panel>

<d_table min-width="1000px">
	<d_tr slot="head">
		<d_th class="d_td_row_id"></d_th>
		<d_th>仓库编号</d_th>
		<d_th>所属机构编号</d_th>
		<d_th>产品编号</d_th>
		<d_th>产品名称</d_th>
		<d_th>区域编号</d_th>
		<d_th>库存数</d_th>
		<d_th>价格</d_th>
		<d_th>是否上线</d_th>
		<d_th>是否缺货</d_th>
		<d_th>审核状态</d_th>
	</d_tr>
	@if(stockList){
	@{int i=0;}
	@for(Stock p : stockList){
	<d_tr slot="body" class="table_row @(i%2==0?"odd":"event")">
	@{i++;}
	<d_td class="td_row_id">
		<input type="checkbox" class="flat" name="__recordId" value="@p.getStockId()"/>
	</d_td>
	<d_td>@p.getStockId()</d_td>
	<d_td>@p.getOrgId()</d_td>
	<d_td>@p.getProductId()</d_td>
	<d_td>@p.getProductName()</d_td>
	<d_td>@p.getAreaId()</d_td>
	<d_td>@p.getQuantity()</d_td>
	<d_td>@p.getPrice()</d_td>
	<d_td>@p.getOnline()</d_td>
	<d_td>@p.getOutOfStock()</d_td>
	<d_td>@p.getCheckState()</d_td>
	</d_tr>
	}}
</d_table>